﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VoteList.aspx.cs" Inherits="Hxsoft.AppV1.Admin.VoteManage.VoteList" %>

<%@ Register Src="~/Controls/ListBox_FootBox.ascx" TagName="ListBox_FootBox" TagPrefix="uc" %>
<%@ Register Src="~/Controls/ListBox_HeadBox.ascx" TagName="ListBox_HeadBox" TagPrefix="uc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
	<title>[ 投票 ]</title>

	<script type="text/javascript" src="<%# ResolveUrl("~/J/List.js") %>"></script>

	<script language="javascript" type="text/javascript">
	<!--
		function ReloadPage() {
			var btReload = document.getElementById("<%# BtReload.ClientID %>");
			if (btReload)
				btReload.click();
		}
	-->
	</script>

</head>
<body>
	<form id="form1" runat="server">
	<asp:ScriptManager ID="ScriptManager1" runat="server">
	</asp:ScriptManager>
	<div id="MainBody" runat="server" class="FormBody">
		当前位置: 管理中心 →[<%= SiteName %>→<%=VoteClassName %>] 投票管理
		<uc:ListBox_HeadBox ID="ListBox_HeadBox1" runat="server" />
		<div class="ListBoxItem">
			<table id="ToolBarBox" cellspacing="0" width="100%">
				<tr>
					<td class="LevelCompart" align="right">
						<input type="button" class="Button" value="全选" onclick="SelectAllInner(&quot;List&quot;, &quot;&quot;);" />
						<input type="button" class="Button" value="反选" onclick="SelectReverseInner(&quot;List&quot;, &quot;&quot;);" />
						|
						<input type="submit" id="BtSeffiective" value="设置状态" runat="server" class="Button"
							onclick="return confirm(&quot;是否修改选定信息的状态？&quot;);" onserverclick="BtSeffiective_ServerClick" />
						|
						<input type="button" id="BtMadeVoteScript" value="生成内嵌投票脚本" runat="server" class="Button"
							onserverclick="BtMadeVoteScript_ServerClick" />
						<input type="submit" id="BtDelete" value="删除" runat="server" class="Button" onserverclick="BtDelete_ServerClick"
							onclick="return confirm(&quot;是否删除选定的信息？&quot;);" />
						<input class="Button" onclick="javascript:OpenWindowCenter(&quot;AddVote.aspx?ClassId=<%# ClassId %>&SiteId=<%# SiteId %>&quot;);"
							type="button" value="添加" />
					</td>
				</tr>
				<tr>
					<td id="Foot">
						关键字:<asp:TextBox ID="TbKeyword" runat="server"></asp:TextBox>
						频道:<Hxctr:DicSelector runat="server" ID="CtrChannelIds" ClassCode="<%# Hxsoft.AppV1.Module.Common.DicClassName_ChannelCategory %>"
							SiteId="<%# SiteId %>" />
						<asp:Button ID="BtSearch" runat="server" Text="搜索" OnClick="BtSearch_Click" />
						|
						<asp:Button ID="BtReload" runat="server" Text="刷新" OnClick="BtReload_Click" />
					</td>
				</tr>
			</table>
		</div>
		<div class="ListBoxItem">
			<asp:UpdatePanel ID="UpdatePanel1" runat="server">
				<ContentTemplate>
					<table id="ListBox" cellspacing="0" width="100%">
						<tbody>
							<tr>
								<td class="LevelCompart">
									<asp:Repeater ID="List" runat="server" OnItemCommand="List_ItemCommand">
										<HeaderTemplate>
											<table id="List" cellspacing="1" cellpadding="2" width="100%">
												<tr id="Title">
													<th width="40">
														ID
													</th>
													<th>
														标题
													</th>
													<th width="40">
														过期
													</th>
													<th width="40">
														有效
													</th>
													<th width="40">
														票数
													</th>
													<th width="60">
														首页显示
													</th>
													<th width="40">
														管理
													</th>
													<th width="40">
														删除
													</th>
													<th width="40">
														选择
													</th>
												</tr>
										</HeaderTemplate>
										<ItemTemplate>
											<tr class="mouseout" align="center" onmouseover="listItem_mouseOver(this);" onmouseout="listItem_mouseOut(this);">
												<td>
													<%# Eval("VoteId") %>
												</td>
												<td align="left">
													<%# Eval("Title") %>
												</td>
												<td>
													<%# (DateTime?)Eval("ExpirationDate") == null || (DateTime?)Eval("ExpirationDate") >= DateTime.Now ? "否" : "<span class=\"Emphasize\">过期</span>"%>
												</td>
												<td>
													<asp:LinkButton ID="LbtSetEffectiveState" CommandName="SetEffective" OnClientClick="return confirm(&quot;是否更改该信息的有效状态？&quot;);"
														runat="server"><%# (bool)Eval("IsEffective") == true ? "是" : "<span class=\"Emphasize\">否</span>"%></asp:LinkButton>
												</td>
												<td>
													<%# Eval("VoteCount") %>
												</td>
												<td>
													<asp:LinkButton ID="LbtSetHomeDisplay" CommandName="SetHomeDisplay" OnClientClick="return confirm(&quot;是否更改该信息的首页显示状态？&quot;);"
														runat="server"><%# (bool)Eval("IsHomeDisplay") == true ? "是" : "<span class=\"Emphasize\">否</span>"%></asp:LinkButton>
												</td>
												<td>
													<a href="javascript:void(0);" onclick='javascript:OpenWindowCenter("ModifyVote.aspx?VoteID=<%# Eval("VoteId") %>&SiteId=<%# SiteId %>");'>
														管理</a>
												</td>
												<td>
													<asp:LinkButton ID="LbtDelete" CommandName="Delete" OnClientClick="return confirm(&quot;是否删除该信息？&quot;);"
														runat="server">删除</asp:LinkButton>
												</td>
												<td>
													<asp:CheckBox ID="CbSelect" runat="server" />
													<asp:HiddenField ID="Identifier_VoteID" Value='<%# Eval("VoteId") %>' runat="server" />
												</td>
											</tr>
										</ItemTemplate>
										<FooterTemplate>
											</table>
										</FooterTemplate>
									</asp:Repeater>
								</td>
							</tr>
							<tr>
								<td id="Td1" align="right">
									<Hxctr:AspNetPager ID="pager" runat="server" AlwaysShow="True" OnPageChanging="pager_PageChanging"
										CustomInfoSectionWidth="" CustomInfoText="" PageSize="20" ShowCustomInfoSection="Left">
									</Hxctr:AspNetPager>
								</td>
							</tr>
						</tbody>
					</table>
					<asp:Literal ID="Literal1" runat="server"></asp:Literal>
				</ContentTemplate>
				<Triggers>
					<asp:AsyncPostBackTrigger ControlID="BtDelete" EventName="ServerClick" />
					<asp:AsyncPostBackTrigger ControlID="BtReload" EventName="Click" />
					<asp:AsyncPostBackTrigger ControlID="BtSearch" EventName="Click" />
					<asp:AsyncPostBackTrigger ControlID="BtSeffiective" EventName="ServerClick" />
					<asp:AsyncPostBackTrigger ControlID="BtMadeVoteScript" EventName="ServerClick" />
				</Triggers>
			</asp:UpdatePanel>
		</div>
		<uc:ListBox_FootBox ID="ListBox_FootBox1" runat="server" />
	</div>
	<Hxctr:MessageBox ID="MessageBox1" runat="server" />
	<Hxctr:UpdateProgress ID="UpdateProgress1" runat="server" />
	</form>
</body>
</html>
